<?php

if (!defined('TS_ROOT')) die(basename(__FILE__));

global $ts_cfg, $template, $userdata, $lang;

if (!empty($template))
{
	$template->assign_vars(array(
		'SIMPLE_FOOTER'    => !empty($gen_simple_header),
		'SHOW_ADMIN_LINK'  => (IS_ADMIN && !defined('IN_ADMIN')),
		'ADMIN_LINK_HREF'  => "admin/index.php",
	));
	$template->set_filenames(array('page_footer' => 'page_footer.tmpl'));
	$template->pparse('page_footer');
}

if(!$ts_cfg['gzip_compress'])
{
	flush();
}

echo '
	</body>
	</html>
';

if (defined('REQUESTED_PAGE') && !defined('DISABLE_CACHING_OUTPUT'))
{
	if (IS_GUEST === true)
	{
		caching_output(true, 'store', REQUESTED_PAGE .'_guest_'. $bb_cfg['default_lang']);
	}
}

ts_exit();